local FightBuff = require("gameLogic.fight.fightBuff.FightBuff")
local BuffSheild = class("BuffSheild", FightBuff)
local Sheild = require("gameLogic.fight.fightSheild.Sheild")

function BuffSheild:ctor(config, entity, whoEntity)
    BuffSheild.super.ctor(self, config, entity, whoEntity)
end

function BuffSheild:_excute(battleReport)
    local manager = self._manager
    local id = manager:getSheildId()
    local sheild = Sheild.new(id, self._config.attack_attr, self._config.attack_value, self._element)
    self._entity:addSheild(sheild, battleReport)
    self._sheildId = id
end

function BuffSheild:resetBuff(battleReport)
    self._entity:removeSheild(self._sheildId, battleReport)
end

return BuffSheild
